package com.chushouya.manager.constants;


import com.general.framework.core.enums.IEnum;

import java.util.Objects;

/**
 * 通知用户类型(1-平台用户2-客户端用户)
 */
public enum NoticeUserTypeEnum implements IEnum<Integer> {

    adminUser(   1, "平台用户"),

    user(   2, "普通用户"),

    store(   3, "门店用户"),

    merchant(   4, "回收商用户")
    ;

    private Integer value;

    private String desc;

    NoticeUserTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (NoticeUserTypeEnum thisEnum : NoticeUserTypeEnum.values()) {
            if (Objects.equals(thisEnum.value, value)) {
                return thisEnum.desc;
            }
        }
        return "";
    }

    @Override
    public Integer value() {
        return this.value;
    }

    @Override
    public String named() {
        return this.desc;
    }
}
